package com.zcf.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zcf.pojo.Recharge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * @author jj
 * @date 2019/11/29 16:28
 */
@Mapper
public interface RechargeMapper extends BaseMapper<Recharge> {

    @Select("select * from zcf_recharge_log where  create_time between #{startTime}  and #{endTime}")
    List<Recharge> selectByExample(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
    @Select("select * from zcf_recharge_log where  create_time between #{startTime}  and #{endTime} and userid = #{userid}")
    List<Recharge> userSumRecharges(@Param("userid") Long userid,@Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
